package com.nwpu.server.search.service;

import com.nwpu.server.search.vo.SearchParam;
import com.nwpu.server.search.vo.SearchResult;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse;

import java.io.IOException;

/**
 * @Author: YuXingZh
 * @Date: Created in 18:46 2022-04-10
 * @Description:
 */
public interface GeneSearchService {

    /**
     * @param param 检索的所有参数
     * @return  返回检索的结果，里面包含页面需要的所有信息
     */
    SearchResult search(SearchParam param);

    SearchResult buildSearchResult(SearchResponse response, SearchParam param);

    SearchRequest buildSearchRequest(SearchParam param);

    SearchRequest obscureSearchRequest(SearchParam param) throws IOException;
}
